using System;
using System.Collections.Generic;
using System.Text;
using GwtRpcNet.Rpc;

namespace GwtRpcNet.CustomFieldSerializers
{
    public class DateTime_CustomFieldSerializer
    {
        public static void Deserialize(RpcNetReader reader, DateTime instance) 
        {
            // No fields
        }

        public static DateTime Instantiate(RpcNetReader reader) 
        {
            return new DateTime(reader.ReadLong());
        }

        public static void serialize(RpcNetWriter writer, DateTime instance) 
        {
            writer.WriteLong(instance.Ticks);
        }
    }
}
